/**
 * @filename:StudentService Student
 * @project constract  V1.0
 * Copyright(c) 2018 lin keqing Co. Ltd. 
 * All right reserved. 
 */
package com.znufe.exam.service;

import java.util.List;

import com.github.pagehelper.PageInfo;
import com.znufe.exam.domain.Student;
import com.znufe.exam.domain.students.StudentResponseObject;
import com.znufe.exam.domain.students.StudentValidationObject;
import com.znufe.exam.domain.students.StudentVoteInfoObject;
import com.znufe.exam.viewmodel.admin.student.*;

/**
 *  
 * @Description:  学生信息表——SERVICE
 * @Author:       lin keqing   
 * @CreateDate:   Student
 * @Version:      V1.0
 *    
 */
public interface StudentService extends BaseService<Student> {
	
	/**
	 * @explain 查询学生信息表对象
	 * @param   id
	 * @return  Student
	 * @author  lin keqing
	 */
	Student selectByPrimaryKey(Integer id);

	/**
	 * selectByStuName
	 *
	 * @exolain 通过学生姓名查找学生
	 * @return: Student
	 * @param: [stuName]
	 * @Author: lin keqing
	 */
	Student selectByStuName(String stuName);
	
	/**
	 * @explain 删除学生信息表对象
	 * @param   id
	 * @return  int
	 * @author  lin keqing
	 */
	int deleteByPrimaryKey(Integer id);
	
	/**
	 * @explain 添加学生信息表对象
	 * @param   student
	 * @return  int
	 * @author  lin keqing
	 */
	int insertSelective(Student student);
	
	/**
	 * @explain 修改学生信息表对象
	 * @param   student
	 * @return  int
	 * @author  lin keqing
	 */
	int updateByPrimaryKeySelective(Student student);
	
	/**
	 * @explain 查询学生信息表集合
	 * @param   student
	 * @return  List<Student>
	 * @author  lin keqing
	 */
	List<Student> queryStudentList(Student student);
	
    /**
     * studentPage
     *
     * @return: PageInfo<StudentResponseObject>
     * @param: requestVM
     * @Author: lin keqing
     */
	PageInfo<StudentResponseObject> studentPage(StudentPageRequestVM requestVM);

	/**
	 * studentSignInPage
	 *
	 * @explain 通过班级ID查询学生签到信息
	 * @return: PageInfo<StudentSignInResponseVM>
	 * @param: [requestVM]
	 * @Author: lin keqing
	 */
	PageInfo<StudentSignInResponseVM> studentSignInPage(StudentSignInRequestVM requestVM);

	/**
	 * getRandomStudent
	 *
	 * @explain 通过班级ID随hi获取这个班的某个学生
	 * @return: RandomStudentResponseVM
	 * @param: [requestVM]
	 * @Author: lin keqing
	 */
	RandomStudentResponseVM getRandomStudent(RandomStudentRequestVM requestVM);

    /**
     * selectByStuPhone
     *
	 * @explain 通过学生电话找学生
     * @return: com.znufe.exam.domain.Student
     * @param: [stuPhone]
     * @Author: lin keqing
     */
	Student selectByStuPhone(String stuPhone);

	/**
	 * selectValidationByClassId
	 *
	 * @explain 通过班级id找出在这个班所有的电话/答题器编号
	 * @return: List<StudentValidationObject>
	 * @param: [classId]
	 * @Author: lin keqing
	 */
	List<StudentValidationObject> selectValidationByClassId(Integer classId);

	/**
	 * insertBatchStudent
	 *
	 * @explain 批量插入学生
	 * @return: int
	 * @param: [studentsToImport]
	 * @Author: lin keqing
	 */
	int insertBatchStudent(List<Student> studentsToImport);

	/**
	 * selectByVoteId
	 *
	 * @explain 按classId、voteId查找学生
	 * @return: com.znufe.exam.domain.Student
	 * @param: [voteId]
	 * @Author: lin keqing
	 */
	Student selectByVoteIdInClass(Integer classId, String voteId);

	/**
	 * selectAllStudentInClass
	 *
	 * @explain 按classId查找某个班所有学生的 编号、答题器编号、基站编号
	 * @return: List<tudentVoteInfoObject>
	 * @param: [classId]
	 * @Author: lin keqing
	 */
	List<StudentVoteInfoObject> selectAllStudentVoteInfoInClass(Integer classId);
}